﻿<phone:PhoneApplicationPage 
    x:Class="Notes.SyncPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
	shell:SystemTray.Opacity="0.8"
    xmlns:live="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
    OrientationChanged="PhoneApplicationPage_OrientationChanged">
	
	<shell:SystemTray.ProgressIndicator>
		<shell:ProgressIndicator IsIndeterminate="True" IsVisible="False" x:Name="loadingProgressBar" />
	</shell:SystemTray.ProgressIndicator>
	
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,32,0,72">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="{Binding Path=LocalizedResources.strTitleApp, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
			<TextBlock x:Name="PageTitle" Text="{Binding Path=LocalizedResources.strTitleSkydriveSync, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
				<RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Grid Grid.Row="0" MinHeight="150" Margin="12,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
				<TextBlock Grid.Row="0" Text="{Binding Path=LocalizedResources.strSigninSkydrive, Source={StaticResource LocalizedStrings}}" />
                <live:SignInButton Grid.Row="1" TextType="SignIn" Name="btnSignin" Scopes="wl.skydrive_update" Branding="Skydrive" SessionChanged="btnSignin_SessionChanged" Click="btnSignin_Click" />
                <ProgressBar Grid.Row="2" Name="progressSignin" IsIndeterminate="True" Opacity="0"/>
                <TextBlock Grid.Row="3" Text=" " TextWrapping="Wrap"  Name="SigninTextBlock" Foreground="{StaticResource PhoneAccentBrush}" />
            </Grid>
            
            <Grid Grid.Row="1" MinHeight="150" Margin="12,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
				<TextBlock Grid.Row="0" Text="{Binding Path=LocalizedResources.strSync, Source={StaticResource LocalizedStrings}}" />
				<Button Grid.Row="1" Name="btnSync" Content="{Binding Path=LocalizedResources.strStartSync, Source={StaticResource LocalizedStrings}}" Click="btnSync_Click" />
                <ProgressBar Grid.Row="2" Name="progressSync" IsIndeterminate="True" Opacity="0"/>
                <TextBlock Grid.Row="3" Text=" " TextWrapping="Wrap"  Name="SyncTextBlock" Foreground="{StaticResource PhoneAccentBrush}" />
            </Grid>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
